
#ifndef CONTACTLISTMANAGER_H
#define CONTACTLISTMANAGER_H

#define BROADCAST_MINTIME 1
#define BROADCAST_MAXTIME 3


#define MAX_ALIAS_PER_IP 1

#include <QVector>
#include <QListWidget>
#include <QListWidgetItem>
#include "publiccontact.h"

class ContactListManager
{
public:
    static const int max_alias_per_ip = MAX_ALIAS_PER_IP;
    static const int broadcast_mintime = BROADCAST_MINTIME;
    static const int broadcast_maxtime = BROADCAST_MAXTIME;
    ContactListManager(QListWidget *contactList);
    void newPublicIdentityPacket(QString alias, int port, QHostAddress ip);
    void updateUi();
    void startConversation(int row);
    void endOfBroadcastScan();
    ~ContactListManager();
    bool officialy_online;
private:
    QListWidget *contactList;
    QVector<PublicContact *> *publicContacts;
};

#endif // CONTACTLISTMANAGER_H
